// 理赔数据模型
const {Schema,model} =require('mongoose');

const claimsSchema = new Schema({
    //申请理赔时间
    applyTime:{
        type:Date,
        default: Date.now
    },
    //理赔处理时间
    handleTime:String,
    //理赔状态
    state:{
        type:Number,
        default:1 //默认1 理赔申请中
    },
    //理赔图片
    images:String,
    accidentTim:String,
    ordersId:{
        type: Schema.Types.ObjectId,
        ref: 'ordersModel'
    },
    isDel:{
        type:Boolean,
        default:false,
    }
}, { versionKey: false });
module.exports.claimsModel = model('claimsModel', claimsSchema, 'claims');
